import { httpGet, httpPost } from '@/utils/http'

/**
 * 获取配置信息
 */
export const getConfigApi = (data) => {
  return httpGet('/system/basic/conf', data)
}

/**
 * 发送邮箱验证码
 * @param email
 * @param type 1注册2找回密码
 */
export const sendEmailCodeApi = (data) => {
  return httpPost('member/login/send_email_code', data)
}

/**
 * 邮箱注册
 * @param email
 * @param code
 * @param loginpass
 * @param first_name
 * @param last_name
 */
export const registerApi = (data) => {
  return httpPost('/member/login/register', data)
}

/**
 * 邮箱登录
 * @param email
 * @param loginpass
 */
export const loginApi = (data) => {
  return httpPost('/member/login/login', data)
}

/**
 * 重置密码
 * @param email
 * @param code
 * @param loginpass
 */
export const forgetPasswordApi = (data) => {
  return httpPost('/member/login/forgetPass', data)
}

/**
 * 获取用户个人资料
 * @param email
 * @param code
 * @param loginpass
 */
export const getUserInfoApi = (data) => {
  return httpPost('/member/personal/material', data)
}
/**
 * 充值
 * @param money 充值金额
 * @param type 类型：integral金币
 * @param pay_type 支付方式：paypal、usdt
 */
export const rechargeApi = (data) => {
  return httpPost('/member/recharge/recharge', data)
}

/**
 * 获取首页内容
 */
export const getHomeContentApi = (data) => {
  return httpGet('/aboutus/index/index', data)
}

/**
 * 获取关于我们内容
 */
export const getAboutContentApi = (data) => {
  return httpGet('/aboutus/about/index', data)
}

/**
 * 获取评价内容
 */
export const getReviewsContentApi = (data) => {
  return httpGet('/aboutus/reviews/page_desc', data)
}

/**
 * 获取评价列表
 * @param page 页码
 * @param page_size 每页数量
 */
export const getReviewsListApi = (data) => {
  return httpGet('/aboutus/reviews/index', data)
}

/**
 * 获取常见问题内容
 */
export const getFaqContentApi = (data) => {
  return httpGet('/aboutus/problem/index', data)
}

/**
 * 底部订阅
 * @param email
 */
export const subscribeApi = (data) => {
  return httpPost('/aboutus/index/footer_send_email', data)
}

/**
 * 发送会员优惠码
 * @param email
 */
export const sendMemberDiscountCodeApi = (data) => {
  return httpPost('/member/login/send_member_discount_code', data)
}

/**
 * 联系我们
 * @param name
 * @param email
 * @param order 非必填
 * @param message
 * @param game_id
 * @param message
 */
export const contactUsApi = (data) => {
  return httpPost('/shop/index/contact_message', data)
}
